<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'user-profiles-form',
	'enableClientValidation'=>true,
	'enableAjaxValidation'=>true,
	'htmlOptions' => array('enctype' => 'multipart/form-data',)
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>
	<img width='250' height='175' src ="data/avatars/<?php echo $model->avatar;?>"/>
	<div class="row">
		<?php echo $form->labelEx($model,'avatar'); ?>
		<?php echo Chtml::activeFileField($model, 'avatar'); ?>
		<?php echo $form->error($model,'avatar'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'first_name'); ?>
		<?php echo $form->textField($model,'first_name',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'first_name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'last_name'); ?>
		<?php echo $form->textField($model,'last_name',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'last_name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'company'); ?>
		<?php echo $form->textField($model,'company',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'company'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'mobile'); ?>
		<?php echo $form->textField($model,'mobile',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'mobile'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'gender'); ?>
		<?php echo $form->dropDownlist($model,'gender',$model->getGender()); ?>
		<?php echo $form->error($model,'gender'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'address_line1'); ?>
		<?php echo $form->textField($model,'address_line1',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'address_line1'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'address_line2'); ?>
		<?php echo $form->textField($model,'address_line2',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'address_line2'); ?>
	</div>


	<div class="row">
		<?php echo $form->labelEx($model,'yim_handle'); ?>
		<?php echo $form->textField($model,'yim_handle',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'yim_handle'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'skype_handle'); ?>
		<?php echo $form->textField($model,'skype_handle',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'skype_handle'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'website'); ?>
		<?php echo $form->textField($model,'website',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'website'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'facebooksite'); ?>
		<?php echo $form->textField($model,'facebooksite',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'facebooksite'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->